@import './fonts.css';

/* 下拉菜单容器 */
.dropdown-container {
  position: relative;
}

/* 下拉菜单样式 */
.dropdown-menu {
  /*position: absolute;*/
  /*bottom: 100%;*/
  /*left: 50%;*/
  transform: translateY(5%);
  background-color: #5375a5;
  border-radius: 4px;
  padding: 1px 0;
  min-width: 120px;
  /*box-shadow: 0 2px 10px rgba(52, 73, 94, 0.2);*/
  z-index: 2000;
}

.dropdown-item {
  color: white;
  padding: 8px 8px;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #2c3e50;
}

/* 动画效果 */
.slide-fade-enter-active {
  transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
  transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: '思源黑体', sans-serif;
}

.fonts-DIN {
  font-family: 'DIN Pro', sans-serif;
}

.fonts-YouSheBiaoTiHei {
  font-family: 'YouSheBiaoTiHei', sans-serif;
}

* {
  user-select: none;
}

.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

.clearfix::after {
  clear: both;
  content: '';
  display: block;
  overflow: hidden;
}

.fs-10 {
  font-size: 10px;
}

.fs-12 {
  font-size: 12px;
}

.fs-14 {
  font-size: 14px;
}

.fs-16 {
  font-size: 16px;
}

.color-fff {
  color: #fff !important;
}

.pd-10 {
  padding: 10px;
}

.pt-10 {
  padding-top: 10px;
}

.pt-5 {
  padding-top: 5px;
}

.pr-10 {
  padding-right: 10px;
}

.pl-10 {
  padding-left: 10px;
}

.nobg {
  background: transparent !important;
}

.bbnone {
  border-bottom: none !important;
}

.text-center {
  text-align: center !important;
}

.fonts-DIN {
  font-family: 'DIN Pro', sans-serif;
}

.center-section {
  width: calc(100vw - 1048px);
  overflow: hidden;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  z-index: 900;
  pointer-events: none;
  padding: 20px 20px 0px 20px;
}

.device-content {
  pointer-events: auto;
  width: 100%;
  background:#063C6A;
  height: 221px;
  position: relative;
  z-index: 1000;
}

.content {
  display: flex;
  padding: 86px 20px 10px;
  height: calc(100vh - 86px);
  pointer-events: none;
}

.left-section,
.right-section {
  width: 504px;
  pointer-events: auto;
  height: 100%;
  /*overflow: hidden;*/
}

.content-container {
  pointer-events: auto;
  /* background: url('../img/container-bg.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 5px; */
  background-color: rgba(6, 60, 106, 1);
  border-radius:10px;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar:horizontal {
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.3);
}


.stats-box,
.monitor-box,
.history-box,
.device-box {
  margin-bottom: 12px;
}


.monitor-chart,
.species-result,
.environment-info {
  margin-bottom: 10px;
}

.right-section .monitor-box {
  margin-bottom: 10px;
}


.chart-container {
  top: 18px;
  height: 160px;
  width: 100%;
}

.env-layout {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 100%;
  .env-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    position: relative;
    padding: 10px;
    background-size: 100% 100%;
  }

  .env-chart-content {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 100%;
  }

  .env-title {
    font-size: 14px;
    color: rgba(255, 255, 255);
    margin-bottom: 5px;
    margin-top: 15px;
  }

  .air-value {
    font-size: 28px;
    color: #00FF00;
    font-weight: bold;
    line-height: 1;
  }

  .air-level {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
  }

  .env-footer {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
  }

  .air-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
  }

  .env-grid {
    display: grid;
    flex: 1;
    gap: 10px;
    padding: 5px 5px 0px 5px; 
  }

  .env-item {
    border: 1px solid rgba(0, 150, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;

    .env-value {
      font-size: 16px;
      color: #fff;
      margin-bottom: 5px;
    }

    .env-label {
      font-size: 14px;
      color: rgba(255, 255, 255, 0.8);
    }

    .env-value-unit {
      font-size: 14px;
      color: rgba(255, 255, 255, 0.8);
    }
  }

  .item-content {
    text-align: center;
  }
}


.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.item-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.item-icon.normal {
  background: #00FFFF;
}

.item-icon.offline {
  background: #FFA500;
}

.item-icon.error {
  background: #FF4B4B;
}

.item-value {
  font-size: 16px;
  color: #00FFFF;
  font-weight: bold;
}

.item-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.stats-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 150, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.stats-tabs .tab-item {
  flex: 1;
  padding: 15px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

.stats-tabs .tab-item.active {
  background: linear-gradient(90deg,
      rgba(55, 185, 255, 1) 0%,
      rgba(63, 182, 255, 0.3569) 50%,
      rgba(67, 180, 255, 0) 100%);
}

.stats-tabs .stats-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.stats-tabs .stats-value {
  font-size: 24px;
  color: #00FFFF;
  font-weight: bold;
  margin-bottom: 5px;
}

.stats-tabs .stats-value span {
  font-size: 14px;
  margin-left: 4px;
}

.stats-tabs .stats-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.dialog-container {
  display: flex;
  color: #fff;
  line-height: 37px;
  background: linear-gradient(to right, rgba(22, 60, 135, 1), rgba(14, 37, 81, 0.7), rgba(7, 15, 28, 0));

  .dialog-title,
  .dialog-content {
    flex: 1;

    .dialog-item {
      text-align: right;

      span:nth-child(1) {
        margin-right: 10px;
      }

      span:nth-child(2) {
        margin-right: 40px;
      }
    }
  }

  .dialog-title {
    padding-left: 30px;
  }

  .dialog-content {
    margin-left: 180px;
  }
}

.ellipsis {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nowrap {
  white-space: nowrap;
}

.container-bottom-20 {
  margin-bottom: 20px;
}

.content-container-height-262 {
  height: 262px;
}

.left-section{
  animation: enterLeft 1s ease forwards;
}
.right-section{
  animation: enterRight 1s ease forwards;
}
@keyframes leaveLeft {
  from {
    transform: translateX(0); /* 从顶部开始 */
  }
  to {
    transform: translateX(-100%); /* 移动到原始位置 */
  }
}
/* 定义动画 */
@keyframes enterLeft {
  from {
    transform: translateX(-100%); /* 从顶部开始 */
  }
  to {
    transform: translateX(0); /* 移动到原始位置 */
  }
}
@keyframes enterRight {
  from {
    transform: translateX(100%); /* 从顶部开始 */
  }
  to {
    transform: translateX(0); /* 移动到原始位置 */
  }
}